<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN">

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!--//登陆密码为 php    -->
<?php
include("php100_message_conn.php");

  if($_GET[out]){
  	setcookie("cookie", "out");
    echo "<script language=\"javascript\">location.href='php100_message_login.php';</script>";
  }


  if($_POST[id]=='admin'){
    $pw=md5($_POST[pw]);
    if($pw=='e1bfd762321e409cee4ac0b6e841963c'){
     setcookie("cookie", "ok");
       echo "<script language=\"javascript\">location.href='php100_message_login.php';</script>";
    }
  }
include("php100_message_head.php");
if($_COOKIE['cookie']!='ok'){
?>

<SCRIPT language=javascript>
function Checklogin()
{
	if (myform.id.value=="")
	{
		alert("请填写登录名");
		myform.id.focus();
		return false;
	}
		if (myform.pw.value=="")
	{
		alert("密码不能为空");
		myform.pw.focus();
		return false;
	}
}
</SCRIPT>

<form action="" method="post" name="myform" onsubmit="return Checklogin();">
  ID：<input type="text" name="id" /><br>
  PW：<input type="password" name="pw" /> <input type="submit" name="submit" value="登陆"/>
  </form>
<?
}else{
?>
	<a href='?out=login'>退出</a>
<?
}
?>